package cn.zhku.edu.feign.pojo.entry;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 评论表
 * @author clk
 */
@Data
@TableName("评论表")
public class Comment implements Serializable {
    @TableId(type = IdType.INPUT)
    private Integer cid;

    /**
     * 商品id
     */
    private Integer gid;

    /**
     * 用户id
     */
    private String uid;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date commentTime;

    private String commentDetails;

    private static final long serialVersionUID = 1L;

    public Comment(Integer cid, Integer gid, String uid, Date commentTime, String commentDetails) {
        this.cid = cid;
        this.gid = gid;
        this.uid = uid;
        this.commentTime = commentTime;
        this.commentDetails = commentDetails;
    }

    public Comment(Integer gid, String uid, Date commentTime, String commentDetails) {
        this.gid = gid;
        this.uid = uid;
        this.commentTime = commentTime;
        this.commentDetails = commentDetails;
    }
}